﻿@model IList<myMvcBlog.Comment>
@if (Model == null)
{

}
else
{
    <ol id="commentList" class="commentList">
        @foreach (var comment in Model)
        {
            <li id="@string.Format("comment{0}", comment.ID)" class="commentItem">
                <div class="userInfo">
                    <a class="avatar" rel="nofollow" target="_blank">
                        @if (!string.IsNullOrEmpty(comment.ImageSrc))
                        { 
                            <img alt="userIcon" src="@comment.ImageSrc" />
                        }
                        else {
                            <img alt="userIcon" src="@Url.Content("~/Content/Images/user.gif")" /> 
                        }
                    </a>
                    <br />
                    <span class="ipaddress">@comment.IP</span>
                </div>
                <h4>
                    <a rel="nofollow" target="_blank">@comment.Author</a>
                    <span class="time">@comment.CommentTime</span>
                </h4>
                <div id="commentContent" class="commentContent">
                    <p>
                        @Html.Raw(comment.Content)
                    </p>
                </div>
            </li>
        }
    </ol> 
}

